package com.sc.nft.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.MallMember;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sc.nft.entity.dto.AdminMallMemberDetailDTO;
import com.sc.nft.entity.dto.AdminMallMemberPageDTO;
import com.sc.nft.entity.dto.MallMemberPageDTO;
import com.sc.nft.entity.dto.UserMallMemberDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 商城会员 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2024-03-29
 */
public interface MallMemberMapper extends BaseMapper<MallMember> {

    /**
     * 获取商城会员列表
     *
     * @param page
     * @return
     */
    Page<AdminMallMemberPageDTO> getAdminMallMemberPageDTO(Page page);


    /**
     * 获取商城会员列表(app)
     *
     * @param page
     * @return
     */
    Page<MallMemberPageDTO> getMallMemberPageDTO(Page page);

    /**
     * 获取用户商城会员
     *
     * @param userId
     * @return
     */
    List<UserMallMemberDTO> getUserMallMember(@Param("userId") Long userId);


    /**
     * 获取商城会员详情
     *
     * @param id 会员id
     * @return
     */
    AdminMallMemberDetailDTO getAdminMallMemberDetailDTO(@Param("id") Long id);

}
